<template lang="jade">
h-loader-full(url='loader')
  .box
    m-title(icon='add',name='修改')
    table.single


      mf-row(name='现居地：'): input(type='text',v-model='detail.area')


      mf-row(name='工作经验：'): input(type='text',v-model='detail.town')

      mf-row(name='意向薪资：'): input(type='text',v-model='detail.village')

      mf-row(name='姓名：'): input(type='text',v-model='detail.name')

      mf-row(name='电话：'): input(type='text',v-model='detail.phone')

      mf-row(name='性别：')
        select(v-model='detail.sex')
            option(value='男') 男
            option(value='女') 女

      mf-row(name='身份证号：'): input(type='text',v-model='detail.pincode')

      mf-row(name='年龄：'): input(type='text',v-model='detail.age')

      mf-row(name='学历：')
        select(v-model='detail.education')
            option(value='小学') 小学
            option(value='初中') 初中
            option(value='大专') 大专
            option(value='本科') 本科
            option(value='本科及以上') 本科及以上

      mf-row(name='具备技能：'): input(type='text',v-model='detail.skill')

      mf-row(name='求职意向：'): input(type='text',v-model='detail.intention')




      mf-row(name='')
        button(@click='change') 确认修改
</template>
----------------------------------------------------------------------------------------
<script>
import { MessageBox } from 'mint-ui'
export default {
  data () {
    return {

      detail:{
        area:"容城",
        town:"",
        village:"",
        name:"",
        phone:"",
        sex:"",
        pincode:"",
        age:"",
        education:"",
        skill:"",
        hascert:"",
        intention:"",
        haswork:"",
        train_intention:"",
      },

      train_intention_list:[
        "电工","焊工","起重装卸机械操作工","电梯安装维修工","制冷空调系统安装维修工","消防设施操作员","防水工","砌筑工","混凝土工","钢筋工","架子工","锅炉操作工","手工木工","眼镜验光员","眼镜定配工","汽车维修工","美容师","美发师","育婴员","幼教","保安员","安检员","智能楼宇管理员","安全评价师","劳动关系协调员","企业人力资源管理师","中央空调系统运行操作员","其他"
      ],

      location:{

        '容城':{
            "容城镇":[
              '上坡', '沟西', '后营', '城内', '东关', '南关',
              '西关', '北关', '东庄', '南庄', '西庄', '东牛',
              '北城', '白龙', '王果庄', '大楼堤', '小楼堤',  '小白塔',
              '马家庄',  '谷家庄',  '午方东庄', '午方南庄', '午方西庄', '午方北庄'
            ],

            "南张镇":[
              '南张', '北张', '沙河', '西牛', '段庄', '李茂',
              '沙河营',  '野桥营',  '小野桥',  '西野桥',  '东野桥',  '苏李庄',
              '小北张'         
            ],

            "小里镇":[
              '西小里','东小里','新庄窠','河北庄','黑龙口','西牛营',
              '胜利庄','许家园','王村','师庄'
            ],

            "大河镇":[
              '大河','王路','西里','东里','张市','留村',
              '胡村','北郑','南郑','西孙','东孙','河西',
              '南文营','南文','罗河'   
            ],

            "平王乡":[
              '平王','赵村','羊定','古贤','李郎','郭村',
              '留通','昝村','沙窝','大先王','小先王','高小王',
              '李小王','仇小王'     
            ],

            "八于乡":[
              '南八于','大八于','大张堡','南张堡','西张庄','大南头',
              '小南头','北河照','南河照','东河','西河','西堑',
              '李庄','朱庄','龚庄','薛庄','东陈杨庄','南陈杨庄',
              '西陈杨庄','北陈杨庄'   
            ],

            "贾光乡":[
              '贾光','沟市','城子','西四庄','东四庄','张楚营',
              '西张楚','东张楚','高家庄','刘家庄','王家庄','南后台',
              '北后台'       
            ],

            "晾马台乡":[
              '王家营','刘合庄','北王昝','南王昝','东王庄','西北阳',
              '东北阳','复兴庄','崇明庄','猛通庄','晾马台','北剧',
              '南剧','南阳','辛庄','张庄','东李家营','西李家营'      
            ]

        }
      },





   }
  },
  mounted () {
    this.$ajax.get('get_village/datail/' + this.$query.get('id'),(res)=>{
      let data = res['data'][0][0];
      this.detail = data;
    });
  },
  methods: {


      change(){
        this.$ajax.put('village/change',this.detail,(res)=>{
          this.$msg.success('修改成功')
        },(res)=>{
          this.$msg.error('修改失败')
        })
      },


    }
  }
</script>
----------------------------------------------------------------------------------------
<style lang="less" scoped>
@import "../../../plugin/style/mixin";

</style>